Class Utility

java.lang.Object
edu.uky.ai.tic.ai.Utility

public class Utility
extends java.lang.Object
A utility function measures how desirable a given state is for some agent. Because we are assuming a two player zero-sum game, we can say that player X is trying to maximize utility and player O is trying to minimize utility.
Author:
Stephen G. Ware
  • Constructor Summary

    Constructors 
    Constructor Description
    Utility()  
  • Method Summary

    Modifier and Type Method Description
    static double evaluate​(State state)
    Returns the desirability of the current state for player X.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • evaluate

      public static double evaluate​(State state)
      Returns the desirability of the current state for player X.
      Parameters:
      state - the current state of the game
      Returns:
      a positive or negative number or zero